package com.ysq.www.api.front.mapper;

import com.ysq.www.api.front.entity.ActivityApply;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 活动报名表 Mapper 接口
 * </p>
 *
 * @author dql
 * @since 2020-08-08
 */
public interface ActivityApplyMapper extends BaseMapper<ActivityApply> {

    /**
     * 根据活动id查询已报名人数
     * @param id 活动id
     * @return
     */
    @Select("select COUNT(*) from t_activity_apply where activity_id = #{id}")
    Integer selectAmountById(Integer id);
}
